package com.hege.controller;

import com.hege.domain.SysUser;
import com.hege.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author hege
 * @Date 2020/11/22 21:51
 * @Version 1.0
 */

@RestController
@RequestMapping("/testBoot")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("getUser/{id}")
    public SysUser getUser(@PathVariable int id){
        return userService.queryUserById(id);
    }
}